<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: BaseArp Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00017.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">BaseArp Class Reference<div class="ingroups"><a class="el" href="a00507.html">netwLayer - network layer modules</a> &#124; <a class="el" href="a00516.html">baseModules - base module classes of MiXiM</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="BaseArp" --><!-- doxytag: inherits="ArpInterface,AddressingInterface,BaseModule" -->
<p>A class to convert integer layer addresses.  
 <a href="a00017.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00264_source.html">BaseArp.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for BaseArp:</div>
<div class="dyncontent">
<div class="center"><img src="a00563.png" border="0" usemap="#BaseArp_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for BaseArp:</div>
<div class="dyncontent">
<div class="center"><img src="a00564.png" border="0" usemap="#BaseArp_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00565.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00017.html#a424a847f259dbde5a83aa7c30a3a32bd">initialize</a> (int stage)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Basic initialization for all modules.  <a href="#a424a847f259dbde5a83aa7c30a3a32bd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a135cde8c1da09de4f40172e4624d771b"></a><!-- doxytag: member="BaseArp::handleMessage" ref="a135cde8c1da09de4f40172e4624d771b" args="(cMessage *)" -->
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00017.html#a135cde8c1da09de4f40172e4624d771b">handleMessage</a> (cMessage *)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">should not be called, instead direct calls to the radio methods should be used. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1d9f02236e27d18f7674b4783469de66"></a><!-- doxytag: member="BaseArp::getMacAddr" ref="a1d9f02236e27d18f7674b4783469de66" args="(const LAddress::L3Type &amp;netwAddr) const " -->
virtual <a class="el" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210">LAddress::L2Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00017.html#a1d9f02236e27d18f7674b4783469de66">getMacAddr</a> (const <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">LAddress::L3Type</a> &amp;netwAddr) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a L2 address to a given L3 address. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a78d2ec3b76eb4f6ac90405c48a498579"></a><!-- doxytag: member="BaseArp::myMacAddr" ref="a78d2ec3b76eb4f6ac90405c48a498579" args="(const cModule *mac) const " -->
virtual <a class="el" href="a00117.html#aea56b60dcb5ae8c2bde465271daf7210">LAddress::L2Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00017.html#a78d2ec3b76eb4f6ac90405c48a498579">myMacAddr</a> (const cModule *mac) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the L2 address for the passed mac. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7d56f12536f10efeb4c4ef7a75c3a4be"></a><!-- doxytag: member="BaseArp::myNetwAddr" ref="a7d56f12536f10efeb4c4ef7a75c3a4be" args="(const cModule *netw) const " -->
virtual <a class="el" href="a00117.html#ad85cd9e8d9e7e9cd5d02dd740c4a12a4">LAddress::L3Type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00017.html#a7d56f12536f10efeb4c4ef7a75c3a4be">myNetwAddr</a> (const cModule *netw) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the L3 address for the passed net. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a20ca05db31d80a36c5b0263b6ead1a1d"></a><!-- doxytag: member="BaseArp::coreDebug" ref="a20ca05db31d80a36c5b0263b6ead1a1d" args="" -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00017.html#a20ca05db31d80a36c5b0263b6ead1a1d">coreDebug</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Is core debugging enabled? <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A class to convert integer layer addresses. </p>
<p>This class takes the network layer module id as the network layer address and the NIC module id as the mac layer address</p>
<p>ARP implementations are divers, it does not make sense to start from a common class. Their main purpose is to translate layer 2 into layer 3 addresses. However, these addresses can be very different. Here, simple integers are sufficient, but for hardware-in-the-loop simulations more complex ones are appropriate.</p>
<p>In contrast to this ARP, others may want to cache entries.</p>
<p>Since this simplified ARP relies on a certain addressing scheme it implements the <a class="el" href="a00004.html" title="Interface for modules which assign L2 and L3 addresses for modules.">AddressingInterface</a> to be able to define the addresses for each network and mac layer.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>Daniel Willkomm </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a424a847f259dbde5a83aa7c30a3a32bd"></a><!-- doxytag: member="BaseArp::initialize" ref="a424a847f259dbde5a83aa7c30a3a32bd" args="(int stage)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void BaseArp::initialize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>stage</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Basic initialization for all modules. </p>
<p>Subscription should be in stage==0, and firing notifications in stage==1 or later.</p>
<p>NOTE: You have to call this in the <a class="el" href="a00017.html#a424a847f259dbde5a83aa7c30a3a32bd" title="Basic initialization for all modules.">initialize()</a> function of the inherited class! </p>

<p>Reimplemented from <a class="el" href="a00027.html#a03030e439aaf030c83da6e71e8be2f80">BaseModule</a>.</p>

<p>References <a class="el" href="a00017.html#a20ca05db31d80a36c5b0263b6ead1a1d">coreDebug</a>.</p>
<div class="fragment"><pre class="fragment">{
    <a class="code" href="a00017.html#a424a847f259dbde5a83aa7c30a3a32bd" title="Basic initialization for all modules.">BaseModule::initialize</a>(stage);
    <span class="keywordflow">if</span>(stage==0) {
        hasPar(<span class="stringliteral">&quot;coreDebug&quot;</span>) ? <a class="code" href="a00017.html#a20ca05db31d80a36c5b0263b6ead1a1d" title="Is core debugging enabled?">coreDebug</a> = par(<span class="stringliteral">&quot;coreDebug&quot;</span>).boolValue() : <a class="code" href="a00017.html#a20ca05db31d80a36c5b0263b6ead1a1d" title="Is core debugging enabled?">coreDebug</a> = <span class="keyword">false</span>;
  }
}
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/modules/<a class="el" href="a00264_source.html">BaseArp.h</a></li>
<li>D:/Projects/MiXiM/extsrc/mixim/src/base/modules/BaseArp.cc</li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00017.html">BaseArp</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:31 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
